<?php

namespace app\admin\validate\shop\order;

use think\Validate;

class Export extends Validate
{
    protected $failException = true;

    /**
     * 验证规则
     */
    protected $rule = [
        'name'          => 'require',
        'export_fields' => 'require'
    ];

    /**
     * 提示消息
     */
    protected $message = [
        'name.require'          => '导出文件名称不能为空',
        'export_fields.require' => '导出字段不能为空'
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => [''],
        'edit' => [''],
        'pre'  => ['name', 'export_fields']
    ];

}
